package guda.house.dal.dao;

import guda.grape.autogen.common.page.BaseQuery;
import guda.house.dal.dataobject.BillExtDO;

import java.util.Date;
import java.util.List;

public interface BillExtDAO {


    Long insert(BillExtDO billExt);


    BillExtDO getBillExtById(Long billId);


    boolean delBillExtById(Long billId);

    List<BillExtDO> getBillExtByIds(List idsList);

    /**
     * 清空测试用例加入的autoincrement
     */
    void cleanAutoIncrement(Long billId);

    List<BillExtDO> selectForPage(BaseQuery baseQuery);

    int countForPage(BaseQuery baseQuery);

    void updateByIdSelective(BillExtDO billExt);

    List<BillExtDO> selectForDeposit(BaseQuery baseQuery);
    int countForDeposit(BaseQuery baseQuery);

    List<BillExtDO> selectForUnpay(BaseQuery baseQuery);

    int countForUnpay(BaseQuery baseQuery);

    Long statBill(List<Long> suitIdList,String gmtDate,Integer isPayed,List<Long> billTypeIdList);

    Long statBill(List<Long> suitIdList,String gmtDate,Integer isPayed,Long billTypeId);

    List<BillExtDO> getByPayId(long payId);

    Long statDichanDiscount(List<Long> suitIdList,String gmtDate);

    Long statSelfDiscount(List<Long> suitIdList,String gmtDate);

    Long statRefund(List<Long> suitIdList,String gmtDate,Long billTypeId);
    Long statRefund(List<Long> suitIdList,String gmtDate,List<Long> billTypeIdList);

    Long statBillByTime(List<Long> suitIdList,Date gmtStart,Date endStart);

    Long statPaidBill(List<Long> billIdList);

}
